<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <%@include file="../jspf/resources.jspf" %>
        
        <title>Vitajte!</title>
    </head>

    <body>

        <%@include file="../jspf/header.jspf" %>

    <main>
        <fieldset>
            <legend>Užívatelia: </legend>

            <table class="entityViewTable" >

                <thead>
                    <tr>
                        <th>Meno</th>
                        <th>Akcie</th>
                    </tr>
                </thead>

                <tbody>
                    <c:forEach items="${users}" var="user" >
                        <tr>
                            <td><c:out value="${user.name}" /></td>
                            <td>
                                <a href="<c:url value="/viewdata?userID=${user.id}" />">detail</a>
                                <a href="<c:url value="/admin/editor/user/${user.id}" />">zmeň</a>
                                <a href="<c:url value="/admin/editor/delete/user/${user.id}" />">zmaž</a>
                            </td>
                        </tr>
                    </c:forEach>
                </tbody>

            </table>

            <a href="<c:url value="/admin/editor/user" />" >pridať uživatela</a>

        </fieldset>
    </main>    

    <%@include file="../jspf/footer.jspf" %>

</body>
</html>
